package Test;//package Vehicle_rental_management_system.Test;
//
//import javax.swing.*;
//import java.awt.*;
//import java.awt.event.*;
//
///**
// * y=ax*x+bx+c
// *
// *
// *
// * */
//public class 画图程序 extends JFrame implements ActionListener, MouseMotionListener, MouseListener, ComponentListener {
//    int x1,y1,x2,y2;
//    Graphics2D G;
//    JPanel drawingPanel;
//    public 画图程序(){
//        int []s={};
//        Cursor cursor = new Cursor(Cursor.CROSSHAIR_CURSOR);
//
//
//        setCursor(cursor);
//        addMouseListener(this);
//        addMouseMotionListener(this);
//        drawingPanel = new JPanel();
//        drawingPanel.setBackground(Color.white);
//        drawingPanel.setPreferredSize(new Dimension(2000, 1000));
//        drawingPanel.addMouseListener(this);
//        drawingPanel.addMouseMotionListener(this);
//        add(drawingPanel,BorderLayout.CENTER);
//        drawingPanel.setBounds(0,0,1000,800);
//        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//        pack();
//
////        setBounds(0,0,1000,800);
//        setContentPane(drawingPanel);
////        setBounds(0,0,1000,
//        setVisible(true);
//        addComponentListener(this);
//        G = (Graphics2D)drawingPanel.getGraphics();
//        int x11=100,y11=100,x22,y22;
//        for ( x22 = 0; x22 <=800; x22++) {
//            y22=200*x22*x22-100*x22-100;
//            G.drawLine(x11,y11,x22,y22);
//            x11=x22;
//            y11=y22;
//        }
//    }
////Cannot invoke "java.awt.Graphics2D.setStroke(java.awt.Stroke)" because "this.G" is null
//    @Override
//    public void actionPerformed(ActionEvent e) {
//
//
//    }
//    @Override
//    public void mouseClicked(MouseEvent e) {
//
//    }
//    @Override
//    public void mousePressed(MouseEvent e) {
//        x1=e.getLocationOnScreen().x-2;
//        y1=e.getLocationOnScreen().y-25;
//    }
//    @Override
//    public void mouseReleased(MouseEvent e) {
//        x2=e.getLocationOnScreen().x-2;
//        y2=e.getLocationOnScreen().y-25;
//
//        BasicStroke stroke =new BasicStroke(6.0f);
//        G.setStroke(stroke);
//        G.setFont(new Font("����",Font.PLAIN,85));
////
//
//        G.setColor(Color.BLUE);
//        GradientPaint s=new GradientPaint(0,0 , Color.RED,1000,800,Color.yellow);
//        G.setPaint(s);
////        G.rotate(900,500,50);
////        G.setClip((Shape) rootPane);
////        Բ��
////        QuadCurve2D curve1 = new QuadCurve2D.Double(0,50,300,400,500,200);
////        Arc2D arc1 = new Arc2D.Double(8,30,85,60,5,90, Arc2D.OPEN);
//
////��Ӿ��ε����Ͻ�(10��30)����85����60����ʼ����5�ȣ���ֹ����90��
////        G.drawString("����ľ����˹�ؿ�",100,300);
////        G.draw(arc1);
////        G.draw(curve1);
//        G.drawLine(x1,y1,x2,y2);
////        G.drawOval(10,20,600,500);
//
//    }
//    @Override
//    public void mouseEntered(MouseEvent e) {
//
//    }
//    @Override
//    public void mouseExited(MouseEvent e) {
//
//    }
//    @Override
//    public void mouseDragged(MouseEvent e) {
//
//    }
//    @Override
//    public void mouseMoved(MouseEvent e) {
//
//    }
////    public  void  g(){
////        G = (Graphics2D)drawingPanel.getGraphics();
////        BasicStroke stroke =new BasicStroke(16.0f);
////        G.setStroke(stroke);
////        G.setFont(new Font("����",Font.PLAIN,85));
//////
////
////        G.setColor(Color.BLUE);
////        GradientPaint s=new GradientPaint(0,0 , Color.RED,1000,800,Color.yellow);
////        G.setPaint(s);
//////        G.rotate(900,500,50);
//////        G.setClip((Shape) rootPane);
//////        Բ��
////        QuadCurve2D curve1 = new QuadCurve2D.Double(0,50,300,400,500,200);
////        Arc2D arc1 = new Arc2D.Double(8,30,85,60,5,90, Arc2D.OPEN);
////
//////��Ӿ��ε����Ͻ�(10��30)����85����60����ʼ����5�ȣ���ֹ����90��
////        G.drawString("����ľ����˹�ؿ�",100,300);
////        G.draw(arc1);
////        G.draw(curve1);
////        Ellipse2D  s1=new Ellipse2D() {
////            @Override
////            public double getX() {
////                return 0;
////            }
////
////            @Override
////            public double getY() {
////                return 0;
////            }
////
////            @Override
////            public double getWidth() {
////                return 0;
////            }
////
////            @Override
////            public double getHeight() {
////                return 0;
////            }
////
////            @Override
////            public boolean isEmpty() {
////                return false;
////            }
////
////            @Override
////            public void setFrame(double x, double y, double w, double h) {
////
////            }
////
////            @Override
////            public Rectangle2D getBounds2D() {
////                return null;
////            }
////        } ;
////        G.drawLine(10,10,500,500);
////        G.drawOval(10,20,600,500);
////
////
////
//////        pack();
////    }
//
//    public static void main(String[] args) {
//        画图程序 f =new 画图程序();
////        f.g();
//
//    }
//
//    @Override
//    public void componentResized(ComponentEvent e) {
//        JPanel drawingPanel=new JPanel(){
//            @Override
//            public void paint(Graphics g) {
//                super.paint(g);
//                BasicStroke basicStroke=new BasicStroke(8.00f);
//                g=(Graphics2D)g;
//                ((Graphics2D) g).setStroke(basicStroke);
//                g.drawLine(100,100,400,500);
//
//            }
//        };
//        setContentPane(drawingPanel);
////        Dimension dimension=getSize();
////        G.drawLine(x1,y1,x2,y2);
////        setContentPane(drawingPanel);
//
//    }
//
//    @Override
//    public void componentMoved(ComponentEvent e) {
//
//    }
//
//    @Override
//    public void componentShown(ComponentEvent e) {
//
//    }
//
//    @Override
//    public void componentHidden(ComponentEvent e) {
//
//    }
//}
